﻿#if _MSC_VER >= 1600
#pragma execution_character_set("utf-8")
#endif

#include <QApplication>
#include <QTextCodec>

#include "CPlcMainWidget.h"

int main(int argc, char *argv[])
{
#ifdef WIN32
    QTextCodec *codec = QTextCodec::codecForName("UTF-8");
#else
    QTextCodec *codec = QTextCodec::codecForName("utf8");
#endif

    QTextCodec::setCodecForLocale(codec);
#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0))
    // qt5之后阉割了这两个方法。
    QTextCodec::setCodecForTr(codec);
    QTextCodec::setCodecForCStrings(codec);
#endif

    QApplication a(argc, argv);
    CPlcMainWidget w;
    w.show();
    return a.exec();
}
